<template>
	<view class="confirm_success">
		<view class="success-img">
			<image src="../../static/images/icon/selected.png" mode="aspectFit"></image>
		</view>

		<view class="text">下单成功</view>

		<view class="btn">
			<view style="width: 330rpx">
				<u-button @click="go('classify')" type="primary" shape="circle" text="继续加菜"></u-button>
			</view>
			<view style="width: 330rpx">
				<u-button @click="go('order')" type="primary" shape="circle" text="完成"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	methods: {
		go(type) {
			if (type === 'classify') {
				uni.switchTab({
					url: '/pages/tab_bar/classify/classify'
				});
			} else {
				uni.switchTab({
					url: '/pages/tab_bar/order/order'
				});
			}
		}
	}
};
</script>

<style scoped lang="scss">
.confirm_success {
	.success-img {
		margin: 40rpx auto;
		height: 280rpx;
		width: 300rpx;
		image {
			width: 100%;
			height: 100%;
		}
	}
	.text {
		font-size: 40rpx;
		text-align: center;
		margin-top: 30rpx;
		font-weight: 600;
	}
	.btn {
		padding: 80rpx 40rpx 0;
		display: flex;
		justify-content: space-between;
	}
}
</style>
